import request from '../../../utils/request'

export function staffPaginationListApi(page_size, current_page) {
  /**
   * 指定分页信息查询员工列表接口
  */
  return request({
    url: '/api/admins/staff/?page_size=' + page_size + '&current_page=' + current_page,
    method: 'GET',
  })
}

export function staffSearchPaginationListApi(page_size, current_page, search_date) {
  /**
   * 指定分页信息查询员工列表接口
  */
  return request({
    url: '/api/admins/staff/?page_size=' + page_size + '&current_page=' + current_page + '&search_data=' + search_date,
    method: 'GET',
  })
}

export function staffSearchApi(search_data) {
  /**
   * 指定查询内容获取员工接口
  */
  return request({
    url: '/api/admins/staff/?search_data=' + search_data,
    method: 'GET',
  })
}

export function staffListApi() {
  /**
   * 员工列表接口
  */
  return request({
    url: '/api/admins/staff/',
    method: 'GET',
  })
}

export function staffCreateApi(data) {
  /**
   * 员工创建接口
  */
  return request({
    url: '/api/admins/staff/',
    method: 'POST',
    data: data,
  })
}


export function staffDeleteApi (data) {
  /**
   * 员工删除接口
  */
  return request({
    url: '/api/admins/staff/' + data['id'] + '/',
    method: 'DELETE',
  })
}

export function staffUpdateApi (data) {
  /**
   * 员工更新接口
  */
  return request({
    url: '/api/admins/staff/' + data['id'] + '/',
    method: 'PATCH',
    data: data
  })
}

export function staffDetailApi (data) {
  /**
   * 单个员工接口
  */
  return request({
    url: '/api/admins/staff/' + data['id'] + '/',
    method: 'GET',
  })
}
